package com.bml.architect.gateway.sentinel;

import com.alibaba.cloud.sentinel.datasource.config.NacosDataSourceProperties;
import com.alibaba.csp.sentinel.datasource.Converter;
import com.alibaba.nacos.api.config.ConfigService;

/**
 * @author: baiml
 * @Title: WriteDataSourceWrapper
 * @ProjectName: 中台技术平台
 * @Depart 中台研发部
 * @Description:
 * @date: 2021/5/8 18:15
 */
public class WriteDataSourceWrapper<T> {

    private ConfigService configService;

    private Converter<T, String> configEncoder;

    private NacosDataSourceProperties nacosDataSourceProperties;

    public WriteDataSourceWrapper(ConfigService configService, Converter<T, String> configEncoder, NacosDataSourceProperties nacosDataSourceProperties) {
        this.configService = configService;
        this.configEncoder = configEncoder;
        this.nacosDataSourceProperties = nacosDataSourceProperties;
    }

    public ConfigService getConfigService() {
        return configService;
    }

    public void setConfigService(ConfigService configService) {
        this.configService = configService;
    }

    public Converter<T, String> getConfigEncoder() {
        return configEncoder;
    }

    public void setConfigEncoder(Converter<T, String> configEncoder) {
        this.configEncoder = configEncoder;
    }

    public NacosDataSourceProperties getNacosDataSourceProperties() {
        return nacosDataSourceProperties;
    }

    public void setNacosDataSourceProperties(NacosDataSourceProperties nacosDataSourceProperties) {
        this.nacosDataSourceProperties = nacosDataSourceProperties;
    }
}
